<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/commons/global.jsp" %>
<!DOCTYPE html>
<html>
<head>
    <%@ include file="/commons/basejs.jsp" %>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>选择机构</title>
    <script type="text/javascript">
        var multiple = "${multiple }";//是否多选
        var cardId="${cardId}";

        //操作单元格
        function formatedit(val,row){
            if(val == 1){//可删除
                return '<a href="javascript:void(0)" class="configManage-easyui-linkbutton-add" id="shop_'+row.id+'" onclick="editshop(1);" >添加</a>';
            }else{//可添加
                return '<a href="javascript:void(0)" class="configManage-easyui-linkbutton-del" id="shop_'+row.id+'" onclick="editshop(0);" >删除</a>';
            }
        }

        function getCombo(flagid){
            var queryParams = {};
            queryParams.flagid = flagid;
            queryParams.cardId = cardId;
            var options = $("#shop_datagrid").datagrid('getPager').data("pagination").options;
            options.pageNumber = 1;
            //重新加载
            $("#shop_datagrid").datagrid('options').queryParams = queryParams;
            $("#shop_datagrid").datagrid('reload');
        }

        //选择操作
        function editshop(type) {

        }

    </script>
</head>
<body>
<div style="padding: 3px;">
    <div data-options="region:'east',split:true,border:false" title="xuanzejigou" style="width:30%;">
        <table id="shop_datagrid" class="easyui-datagrid"
               data-options="
		   		url:'${root}/card/eidtcardClassShop.do',
		   		fit:true,
		   		idField:'id',
		   		rownumbers:true,
		   		fitColumns: true,
		   		toolbar:'#shop_tools',
		   		pagination:true,
		   		singleSelect:true">
            <thead>
            <th data-options="field:'id'">机构ID</th>
            <th data-options="field:'name',width:100">机构名称</th>
            <th data-options="field:'type',width:80,formatter:formatedit">操作</th>
            </thead>
        </table>
        <div id="shop_tools">
            <mytag:perm type="select">
                <label>关键词:</label><input id="notmain_search" class="easyui-searchbox"  style="width:200px"></input>
            </mytag:perm>
        </div>
        <!-- 查询菜单 -->
        <div id="smm_combo2" data-options="onClick:comboMenuHandler2">
            <div data-options="name:'1'">已选择</div>
            <div data-options="name:'2'">未选择</div>
        </div>
    </div>
</div>
</body>
</html>